var app = app || {};

cc.loader.loadJs("src", [

    "framework/init.js",
    "framework/utils/EncryptNumber.js",
    "framework/utils/Localizabel.js",
    "framework/utils/LocalStorage.js",
    "framework/utils/RandomNumber.js",
    "framework/utils/SaxParser.js",
    "framework/utils/StringFormat.js",
    "framework/utils/Utils.js",
    "framework/extends/cocos/CCNode.js",
    "framework/extends/cocos/CCScene.js",
    "framework/extends/cocos/CCSprite.js",
    "framework/extends/cocos/CCTMXTiledMap.js",
    "framework/extends/ccui/layouts/UILayout.js",
    "framework/extends/ccui/uiwidgets/scroll-widget/UIListView.js",
    "framework/extends/ccui/uiwidgets/scroll-widget/UIPageView.js",
    "framework/extends/ccui/uiwidgets/scroll-widget/UIScrollView.js",
    "framework/extends/ccui/uiwidgets/UIButton.js",
    "framework/extends/ccui/uiwidgets/UICheckBox.js",
    "framework/extends/ccui/uiwidgets/UIImageView.js",
    "framework/extends/ccui/uiwidgets/UILoadingBar.js",
    "framework/extends/ccui/uiwidgets/UIRichText.js",
    "framework/extends/ccui/uiwidgets/UISlider.js",
    "framework/extends/ccui/uiwidgets/UIText.js",
    "framework/extends/ccui/uiwidgets/UITextAtlas.js",
    "framework/extends/ccui/uiwidgets/UITextBMFont.js",
    "framework/extends/ccui/uiwidgets/UITextField.js",
    "framework/extends/studio/load.js",
    "framework/extends/studio/parsers/action-1.x.js",
    "framework/extends/studio/parsers/action-2.x.js",
    "framework/extends/studio/parsers/scene-1.x.js",
    "framework/extends/studio/parsers/timelineParser-1.x.js",
    "framework/extends/studio/parsers/timelineParser-2.x.js",
    "framework/extends/studio/parsers/uiParser-1.x.js",
    "framework/mvc/GameObject.js",
    "framework/mvc/AppObject.js",
    "framework/mvc/ControllerObject.js",
    "framework/mvc/ModelObject.js",
    "framework/network/Network.js",

    "test/GameApp.js",
    "test/MainSceneController.js",

    "test/MVCTest/MVCController.js",
    "test/MVCTest/MVCView.js",
    "test/MVCTest/PlayerModel.js",
    "test/RichTextTest/RichTextController.js",
    "test/TipsTest/TipsController.js",
    "test/UIListViewTest/UIListViewController.js",

], function(err){
    app = new GameApp();

    app.setObject("MainScene", new MainSceneController());

    app.initGlobalObject();

    if(err) return console.log("load failed");
    //success
});